package com.dominator.repository;

import com.dominFramework.core.dao.SqlDao;
import com.dominFramework.core.typewrap.Dto;
import com.dominFramework.core.typewrap.Dtos;
import com.dominator.mybatis.dao.T_gua_machineDao;
import com.dominator.mybatis.dao.T_machineDao;
import com.dominator.mybatis.dao.T_machinePO;
import com.dominator.mybatis.dao.T_machine_loginDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class DaoMachine {

    @Autowired
    SqlDao sqlDao;

    @Autowired
    T_machineDao tMachineDao;

    /**
     * 通过机器设备id查询游戏机id
     *
     * @param
     * @return
     */
    public T_machinePO selectByDeviceId(String deviceId) {
        return (T_machinePO) sqlDao.selectOne("Machine.selectByDeviceId", Dtos.newDto("deviceId", deviceId));
    }


    /**
     * 通过极光推送id查询游戏机id
     *
     * @param
     * @return
     */
    public T_machinePO selectByRegistrationId(String registrationId) {
        return (T_machinePO) sqlDao.selectOne("Machine.selectByRegistrationId", Dtos.newDto("registrationId", registrationId));
    }
}
